(vc-find-file-hook): Check buffer-file-name is non-nil.
authorRichard M. Stallman <rms@gnu.org>
Thu, 3 Jun 1993 20:29:41 +0000 (20:29 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 3 Jun 1993 20:29:41 +0000 (20:29 +0000)
lisp/vc-hooks.el

index 18f9bfb0c8d1f836fa63134015d91a9f9b89bca4..83588dcb4fe7ec7f82d5223e04ecf06cb42a24ea 100644 (file)
@@ -137,7 +137,8 @@ visiting FILE."
 (defun vc-find-file-hook ()
   ;; Recompute whether file is version controlled,
   ;; if user has killed the buffer and revisited.
-  (vc-file-setprop buffer-file-name 'vc-backend nil)
+  (if buffer-file-name
+      (vc-file-setprop buffer-file-name 'vc-backend nil))
   (if (and (vc-mode-line buffer-file-name) (not vc-make-backup-files))
       (progn
        (make-local-variable 'make-backup-files)